Skip to content

Conversation

nirinchev
Copy link
Collaborator

@nirinchev nirinchev commented Jul 17, 2025

Proposed changes

The core fix here is moving away from z.record and using a plain z.object({}).passthrough(). The test changes are fixes to what seems to have been copy-paste errors where the prompt and the expectations were mismatched.

Checklist

@nirinchev nirinchev requested a review from a team as a code owner July 17, 2025 18:13
.optional()
.describe("The projection, matching the syntax of the projection argument of db.collection.find()"),
limit: z.number().optional().default(10).describe("The maximum number of documents to return"),
sort: z
.record(z.string(), z.custom<SortDirection>())
.object({})
.catchall(z.custom<SortDirection>())
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This, unfortunately, doesn't correctly set the type for additionalProperties in the JSON schema. This is the reason I had to update the tool description to be extra verbose.

@himanshusinghs himanshusinghs force-pushed the chore/issue-307-proposal-2 branch from 8488144 to ec52ee5 Compare July 18, 2025 01:21
@nirinchev nirinchev force-pushed the poc/unconsolidated/1 branch from fe53d4f to 39b428d Compare July 18, 2025 09:13
@nirinchev nirinchev merged commit 3491a3b into chore/issue-307-proposal-2 Jul 18, 2025
4 of 8 checks passed
@nirinchev nirinchev deleted the poc/unconsolidated/1 branch July 18, 2025 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant